package com.ruitu.health_1.dao.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.Gson;
import com.ruitu.router_module.bean.user.Address;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class OrderList implements Parcelable {

    /**
     * order : {"id":36,"orderSn":"201912250001000008","memberId":80,"payAmount":4088,"status":0,"confirmStatus":0}
     * list : [{"id":56,"orderId":36,"orderSn":"201912250001000008","couponHistoryId":null,"productId":26,"productPic":"http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg","productName":"华为 HUAWEI P20 ","goodsInfo":null,"couponAmount":0,"integrationAmount":0,"realAmount":4088,"giftIntegration":0,"giftGrowth":0,"type":null}]
     */

    private OrderBean order;
    private ArrayList<StoreOrderItemList> storeOrderItemList;


    protected OrderList(Parcel in) {
        storeOrderItemList = in.createTypedArrayList(StoreOrderItemList.CREATOR);
    }

    public static final Creator<OrderList> CREATOR = new Creator<OrderList>() {
        @Override
        public OrderList createFromParcel(Parcel in) {
            return new OrderList(in);
        }

        @Override
        public OrderList[] newArray(int size) {
            return new OrderList[size];
        }
    };

    public OrderBean getOrder() {
        return order;
    }

    public void setOrder(OrderBean order) {
        this.order = order;
    }

    public ArrayList<StoreOrderItemList> getStoreOrderItemList() {
        return storeOrderItemList;
    }

    public void setStoreOrderItemList(ArrayList<StoreOrderItemList> storeOrderItemList) {
        this.storeOrderItemList = storeOrderItemList;
    }

    @Override
    public String toString() {
        return "OrderList{" +
                "order=" + order +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(storeOrderItemList);
    }



}
